﻿using System;
using System.Windows;
using System.Reflection;
using System.ServiceModel;
using PSE.Framework.Process;
using PSE.Framework.Configuration;

namespace Sinacor.UI.HelpViewer.Application
{
    class Starter : BaseProgram
    {
        static Starter()
        {
            Initialize(Sinacor.Infra.Common.Configuration.SystemComponents.System, Sinacor.Infra.Common.Configuration.SystemComponents.UserInterface);
        }  

        [STAThread]
        static void Main()
        {
            SinacorHelpApplication application = null;

            try
            {
                application = new SinacorHelpApplication();
                application.ShutdownMode = ShutdownMode.OnExplicitShutdown;
                application.Run();
            }
            catch (Exception ex)
            {
                SinacorHelpApplication.HandleException(ex);

                if (application != null)
                {
                    application.Shutdown();
                }
            }
        }
    }
}
